/**
 * 
 */
package com.onlinemathuracrud.model;

import javax.persistence.AttributeOverride;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.ForeignKey;

import com.onlinemathuracrud.model.master.City;

/**
 * @author Amit Kashyap
 * @createdDate Sep 13, 2013
 * @createdTime 10:55:36 AM
 */
@Entity
@Table(name="accomodation")
@AttributeOverride( name="id", column = @Column(name="accomodation_id") )

public class Accomodation extends Item {
	
	@ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "accomd_city_id", referencedColumnName = "city_id")
	@ForeignKey(name = "fk_city_id")
	private City accomdCity;

	/**
	 * @return the accomdCity
	 */
	public City getAccomdCity() {
		return accomdCity;
	}

	/**
	 * @param city the city to set
	 */
	public void setAccomdCity(City accomdCity) {
		this.accomdCity = accomdCity;
	}
	
	

}
